<template>
  <div class="home">
    <section class="hero">
      <div class="hero-content">
        <div class="hero-text">
          <h1 class="hero-title">AI学习智能体门户</h1>
          <p class="hero-subtitle">打造您专属的AI学习助手，开启智能化学习新时代</p>
          <div class="hero-actions">
            <el-button type="primary" size="large" @click="$router.push('/register')">
              开始使用
            </el-button>
            <el-button size="large" @click="$router.push('/login')">
              立即登录
            </el-button>
          </div>
        </div>
      </div>
    </section>

    <section class="features">
      <div class="container">
        <h2 class="section-title">核心特性</h2>
        <el-row :gutter="30">
          <el-col :xs="24" :sm="12" :lg="6" v-for="feature in features" :key="feature.id">
            <div class="feature-card">
              <div class="feature-icon">
                <el-icon :size="32">
                  <component :is="feature.icon" />
                </el-icon>
              </div>
              <h3 class="feature-title">{{ feature.title }}</h3>
              <p class="feature-desc">{{ feature.description }}</p>
            </div>
          </el-col>
        </el-row>
      </div>
    </section>
  </div>
</template>

<script setup>
import { Avatar, ChatRound, Document, TrendCharts } from '@element-plus/icons-vue'

const features = [
  {
    id: 1,
    icon: Avatar,
    title: '智能体创建',
    description: '轻松创建和定制您的专属AI学习助手，满足不同学习需求'
  },
  {
    id: 2,
    icon: ChatRound,
    title: '智能对话',
    description: '与AI智能体进行自然对话，获得个性化的学习指导和答疑'
  },
  {
    id: 3,
    icon: Document,
    title: '知识库管理',
    description: '构建专业知识库，让AI智能体具备丰富的专业知识'
  },
  {
    id: 4,
    icon: TrendCharts,
    title: '学习分析',
    description: '深度分析学习进度和效果，提供科学的学习建议'
  }
]
</script>

<style scoped lang="scss">
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  
  .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
  }
  
  .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
  }
}

.features {
  padding: 80px 0;
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  height: 100%;
  
  .feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
  }
  
  .feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }
  
  .feature-desc {
    color: var(--el-text-color-regular);
    line-height: 1.6;
  }
}
</style>